package com.example.springdemo.design_model.adapter;

/**
 * 客户端
 * @author zhangding
 * @date 2022年3月24日10:45:32
 */
public class Client {



    public static void main(String[] args) {
        Phone phone = new Phone();
        phone.charging(new Adapter());
    }


}

/**
 * 接口适配器客户端，适用于不想实现所有的接口方法
 */
class Client2{
    public static void main(String[] args) {
        Phone phone = new Phone();
        phone.charging(new Adapter3() {
            @Override
            public int outPut50v() {
                return 50;
            }
        });
    }
}
